package com.blt.car.widget.dialog;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.blt.car.R;


/**
 * Description :
 *
 * Creation    : 2016/12/8
 * Author      : luoweiqiang
 */
public class LoadingDialog extends Dialog {
    public LoadingDialog(Context context, String strMessage) {
        this(context, R.style.loadDialog, strMessage);
    }

    public LoadingDialog(Context context, int theme, String strMessage) {
        super(context, theme);
        this.setContentView(R.layout.dialog_loading);
//        View loadingView = findViewById(R.id.loading_progress);
//        AnimationDrawable animationDrawable = (AnimationDrawable) loadingView.getBackground();
//        animationDrawable.start();
        TextView tvMsg = (TextView) this.findViewById(R.id.loading_text);
        if (tvMsg != null&&!TextUtils.isEmpty(strMessage)) {
            tvMsg.setText(strMessage);
        }
    }

    @Override
    public void show() {
        super.show();
    }

    @Override
    public void dismiss() {
        super.dismiss();
    }
}
